Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated bare etiss processor #106

Merged

Conversation

Samanti-Das
Copy link

This pull request moves bare_etiss_processor from the examples tree into the main ETISS directory structure, and also enables it to be run directly from the build directory without the need to install ETISS first. The functionality remains unchanged, bare_etiss_processor and its companion run_helper.sh now get compiled to <PREFIX>/bin, where <PREFIX> is either the build or the install directory.

A few hacks had to be done to enable proper execution from the build tree, most notably creating and populating a directory structure for the various include files for jitlibs and ETISS defines.

@Samanti-Das Samanti-Das force-pushed the integrated_bare_etiss_processor branch from 374f784 to 2f04bf8 Compare February 11, 2022 13:30
CMakeLists.txt Outdated
@@ -85,10 +86,23 @@ ELSE()
SET(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address -fsanitize=undefined")
ENDIF()

# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think hacking the rpath is a great way to solve this.

i'd rather suggest that the user is responsible to set the $PATH/$LD_LIBRARY_PATH. we could add convenience by doing that in run_helper.sh

but as long as the install rpath remains unchanged (which i don't think it is), it would still be fine for me.

Copy link
Contributor

@wysiwyng wysiwyng Feb 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i understand it, the way things are handled currently are:
RPATH is set to $ORIGIN, which effectively enables loading of shared objects from relative directories. In the master branch, bare_etiss_processor gets built separately, and as such does not receive $ORIGIN as its RPATH, but an absolute path which points to the ETISS libraries.

Leaving the RPATH settings as-is in this PR would mean that bare_etiss_processor now also has an RPATH of $ORIGIN, which is incorrect as bare_etiss_processor is not placed in the same directory as the libraries.

Two options come to mind:

  1. moving the RPATH-related changes from the top-level CMakeLists.txt to src/bare_etiss_processor/CMakeLists.txt and restoring the top-level CMakeLists.txt
  2. restoring the top-level CMakeLists.txt and adding a relative RPATH entry to bare_etiss_processor, pointing to $ORIGIN/../lib

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say changing RPATH settings on a global scale via CMAKE_* variables is not the best case.
You can also set RPATH stuff as a single target properties, e.g.:
https://cmake.org/cmake/help/latest/prop_tgt/BUILD_RPATH.html
https://cmake.org/cmake/help/latest/prop_tgt/SKIP_BUILD_RPATH.html
and so on...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright then i'd suggest to keep this code location unchanged to retain the homogenous cross platform behavior and move the changes to the bare_etiss target only. ideally this would also keep the $ORIGIN entry. whether that happens through cmake scopes or target properties does not matter to me.

CMakeLists.txt Show resolved Hide resolved
src/bare_etiss_processor/run_helper.sh.in Outdated Show resolved Hide resolved
@rafzi
Copy link
Member

rafzi commented Feb 17, 2022

Looks good otherwise, thanks!

Please make sure not to drop the changes from the conflict: #102

@wysiwyng wysiwyng merged commit 5a37c1f into tum-ei-eda:master May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants